﻿
<%
	/* *
	 *功能：支付宝即时到帐接口调试入口页面
	 *版本：3.2
	 *日期：2011-03-17
	 *说明：
	 *以下代码只是为了方便商户测试而提供的样例代码，商户可以根据自己网站的需要，按照技术文档编写,并非一定要使用该代码。
	 */
%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.alipay.services.*"%>
<%@ page import="com.alipay.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
	<link rel="stylesheet" type="text/css" href="../btn_class.css" />
		<link rel="stylesheet" type="text/css"
			href="../ext-2.2/resources/css/ext-all.css" />
		<link rel="stylesheet" type="text/css"
			href="../ext-2.2/ext-2.2/style.css" />
		<link rel="stylesheet" type="text/css"
			href="../ext-2.2/ext-2.2/desktop.css" />
		<link rel="stylesheet" type="text/css"
			href="../ext-2.2/ext-2.2/ext-patch.css" />
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>支付宝即时到帐接口</title>
<script language=JavaScript>
function CheckForm()
{
	if (document.alipayment.subject.value.length == 0) {
		alert("请输入商品名称.");
		document.alipayment.subject.focus();
		return false;
	}
	if (document.alipayment.total_fee.value.length == 0) {
		alert("请输入付款金额.");
		document.alipayment.total_fee.focus();
		return false;
	}
	var reg	= new RegExp(/^\d*\.?\d{0,2}$/);
	if (! reg.test(document.alipayment.total_fee.value))
	{
        alert("请正确输入付款金额");
		document.alipayment.total_fee.focus();
		return false;
	}
	if (Number(document.alipayment.total_fee.value) < 0.01) {
		alert("付款金额金额最小是0.01.");
		document.alipayment.total_fee.focus();
		return false;
	}
	function getStrLength(value){
        return value.replace(/[^\x00-\xFF]/g,'**').length;
    }
 

    if(getStrLength(document.alipayment.subject.value) > 256){
        alert("标题过长！请在128个汉字以内");
        document.alipayment.subject.focus();
        return false;
    }
	
	
}  

</script>
<style>
td {
	font-size:12px
}
.pMenu {
	color: #0362a0;
	font-size: 14px;
	font-weight : bold;
}

</style>
</head>
<body style="background:white"> 
	<div class="x-panel-header x-panel-header-noborder x-unselectable" id="ext-gen8" style="mozuserselect: none; khtmluserselect: none;" unselectable="on">
		<span class="x-panel-header-text" >支付宝充值</span>
	</div>
	<!-- 
	<table width="100%" border="0" cellspacing="3" cellpadding="3">
			  <tr>
				<td width="15px">&nbsp;</td>
				<td class="pMenu">账户余额</td>
				<td align="right">&nbsp;</td>
			  </tr>
			</table>
  -->
			<table border="0" cellspacing="3" cellpadding="3" >
			<!-- 
			  <tr>
				<td width="40px">&nbsp;</td>
				<td align="center">您的帐户余额：<b>￥00.00</b>&nbsp;&nbsp;</td>
			  </tr>
			   -->
			  <tr>
				<td>&nbsp;</td>
				<td align="center" class="pMenu">通过支付宝充值请使用IE游览器！</td>
			  </tr>
			   <tr>
				<td>&nbsp;</td>
				<td align="center" style="color:#ff0000;">特别注意：充值操作时请不要关闭游览器窗口，请等待页面跳转出现以下图示！</td>
			  </tr>
			  <tr>
				<td>&nbsp;</td>
				<td align="center"><img src="../images/op.jpg"></td>
			  </tr>
			  
			</table>
	<br/>
	
			<table width="100%" border="0" cellspacing="3" cellpadding="3">
			  <tr>
				<td width="15">&nbsp;</td>
				<td class="pMenu">支付宝充值</td>
				<td align="right">&nbsp;</td>
			  </tr>
			</table>
 
			<table border="0" cellspacing="3" cellpadding="3">
			  <form name=alipayment onSubmit="return CheckForm();" action=alipayto.jsp
	method=post target="parent" >
			  <tr>
				<td width="15">&nbsp;</td>
				<td align="center">
				<table border="0" cellspacing="3" cellpadding="3">
					<tr style="display:none">
						<td><input size=30 name=subject value="在线充值"/></td>
					</tr>
					<tr style="display:none">
						<td><input size=30 name=alibody value="运费"/></td>
					</tr>
					
					<tr>
						<td><img src="../images/zfb.gif" border="1" style="border:1px solid #efefef"></td>
					</tr>
					<tr>
						<td>请填入您要充值的金额，充值成功的话，该款项将直接划入您在本系统帐户上。</td>
					</tr>
					<tr>
						<td style="color:#ff0000">没有支付宝帐号的用户，可以在下一个跳出页面通过邮件地址注册成为支付宝用户。</td>
					</tr>
					<tr>
						<td>请输入支付金额，按确认充值。</td>
					</tr>
				</table>
			  </tr>
			  <tr>
				<td>&nbsp;</td>
				<td align="center"><b>充值金额：</b><input maxLength=10 size=15
		name=total_fee onfocus="if(Number(this.value)==0){this.value='';}"
		value="00.00" /> 元
					
				
				<font color="#ff0000">* 免手续费，金额任意输入，格式参考：323.78</font></td>
			  </tr>
			  <tr>
				<td>&nbsp;</td>
				<td align="center"><input type="submit" value=" 确认充值 " name="sb">&nbsp;
				<a href="http://help.alipay.com/support/help_detail.htm?help_id=8621" target="_blank">如何充值</a></td>
			  </tr>
			  </form>
			</table>
 
</body>
</html>
